<template>
  <div>
     <div class="all2">
          <div class="l">
              <div class="left">
          <i class="el-icon-circle-check"></i>
      </div>
      <div class="right">
          <h4>发布商品成功</h4>
          <p>将在
              <span>{{time}}</span>
              秒后跳转到商品列表页</p>
              <p class="list"
              @click="clickList"
              >商品列表</p>
      </div>
          </div>
     </div>
  </div>
</template>

<script>
export default {
    data:()=>{
        return {
            time:5
        }
    },
    mounted(){
        let time =setInterval(()=>{
            this.time--
            if(this.time===0){
                clearInterval(time);
                this.$router.push('/commodity_manager/list')
            }
        },1000)
    },
    methods:{
        clickList(){
             this.$router.push('/commodity_manager/list')
        }
    }
}
</script>

<style soped>
.all2{width:100%;height:100px;margin-top:150px ;margin-left:15%;
text-align: center;}
.left{float:left;width:15%;}.right{float:left;}
.l{width:60%;height:100px;margin-left:20%;}
.left i{font-size:70px;color:rgb(16, 243, 16);}
.right{font-size:12px;width:20%;}
.right h4,p{margin-bottom:5px;}
.right p span{color:blue;}
.right .list{color:rgb(16, 243, 16);cursor: pointer;}
</style>